package cq.zjw.engine.core 
{
	import flash.utils.Dictionary;
	/**
	 * 引擎对象
	 * 目标 可以添加其它对象
	 * @author coty
	 */
	public class Entity implements IEntity
	{
		protected var _name:String;
		protected var _entityMap:Dictionary;
		public function Entity(name:String) 
		{
			_name = name;
		}
		protected function init():void {
			
		}
		
		protected function get entityMap():Dictionary 
		{
			if (_entityMap == null) _entityMap = new Dictionary(true);
		}
		
		public function addEntity(entity:IEntity):void {
			
			entityMap[entity.name] = entity;
		}
		public function get name():String { return _name; }
		
	}

}